<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<head>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
</head>
<body>
    <h1>你好，我是db模块的默认index页面
        <!-- 使用jsp引擎，springboot内置tomcat没有此依赖 -->
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>
        <!-- 添加servlet依赖模块 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <!-- 添加jstl标签库依赖模块 -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <!--  springboot 支持jar包运行jsp文件  原文链接：https://blog.csdn.net/qq_31145141/article/details/76022207-->
        <build>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
            <resources>
                <!--springboot打成jar包是没有webapp目录的，所以要将webapp目录下的文件拷贝到可访问的目录下。-->
                <!-- 必须是1.4，1.5打包还是会找不到文件。 (暂未确认，当前使用版本为2.0+)-->
                <!-- 打包时将jsp文件拷贝到META-INF目录下-->
                <resource>
                    <!-- 指定resources插件处理哪个目录下的资源文件 -->
                    <directory>src/main/webapp</directory>
                    <!--注意此次必须要放在此目录下才能被访问到-->
                    <targetPath>META-INF/resources</targetPath>
                    <includes>
                        <include>**/**</include>
                    </includes>
                </resource>
                <resource>
                    <directory>src/main/resources</directory>
                    <includes>
                        <include>**/**</include>
                    </includes>
                    <filtering>false</filtering>
                </resource>
            </resources>
        </build>

        spring.mvc.view.prefix=/META-INF/resources/
        spring.mvc.view.suffix=.jsp
    </h1>
</body>

